﻿using System;

namespace Collab.Common.Infrastructure
{
    public class JoinMessage : IMessage
    {
        public string UserName { get; set; }

        private string ip;
        public string Ip
        {
            get
            {
                return this.ip;
            }
            set
            {
                this.ip = value;
                if (!this.ip.StartsWith("["))
                    this.ip = String.Format("[{0}]", this.ip);

                if (this.ip == "[localhost]")
                    this.ip = "localhost";
            }
        }

    }
}
